*/
$wgStructuredChangeFiltersOnWatchlist = false;
+/**
+ * Polling rate, in seconds, used by the 'live update' and 'view newest' features
+ * of the RCFilters app on SpecialRecentChanges and Special:Watchlist.
+ * 0 to disable completely.
+ */
+$wgStructuredChangeFiltersLiveUpdatePollingRate = 3;
+
/**
* Use new page patrolling to check new pages on Special:Newpages
*/
]
);
+ $out->addJsConfigVars(
+ 'StructuredChangeFiltersLiveUpdatePollingRate',
+ $this->getConfig()->get( 'StructuredChangeFiltersLiveUpdatePollingRate' )
+ );
+
if ( static::$savedQueriesPreferenceName ) {
$savedQueries = FormatJson::decode(
$this->getUser()->getOption( static::$savedQueriesPreferenceName )
this.initializing = false;
this.switchView( 'default' );
- this._scheduleLiveUpdate();
+ this.pollingRate = mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' );
+ if ( this.pollingRate ) {
+ this._scheduleLiveUpdate();
+ }
};
/**
* @private
*/
mw.rcfilters.Controller.prototype._scheduleLiveUpdate = function () {
- setTimeout( this._doLiveUpdate.bind( this ), 3000 );
+ setTimeout( this._doLiveUpdate.bind( this ), this.pollingRate * 1000 );
};
/**
}
},
featureFlags: {
- liveUpdate: mw.config.get( 'wgStructuredChangeFiltersLiveUpdateSupported' ) &&
+ liveUpdate: mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' ) &&
( mw.user.options.get( 'rcenhancedfilters' ) || new mw.Uri().query.liveupdate )
}
};